
var Paddle = function(game){
    var o = game.imgByName("paddle")
    o.x = 100
    o.y = 250
    o.speed = 15
    o.collide = function(ball){
        return collide(o, ball)
    }
    o.moveLeft = function(){
        if (o.x >= 0){
            o.x -= o.speed 
        }
    }
    o.moveRight = function(){
        if (o.x + o.img.width <= 400){
            o.x += o.speed
        }
    }

    return o
}
